package com.kevinwu.kevinwudemo.interceptor;

import com.kevinwu.framework.annotations.KevinInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@KevinInterceptor
public class MyInterceptor {

    /**
     * 标注了@KevinSecurity注解的方法首先执行该方法校验权限
     * @param args 注解上的参数
     * @param param 方法上的参数
     * @return
     */
    public boolean perHander(String[] args,String param){
        boolean flag = true;
        for (int i = 0; i < args.length; i++) {
            if(args[i].equals(param)){
                flag = false;
                break;
            }
        }
        return  flag;
    }
}
